package com.caochenlei.abstractFactory.factory;

import com.caochenlei.abstractFactory.color.Color;
import com.caochenlei.abstractFactory.shape.Circle;
import com.caochenlei.abstractFactory.shape.Rectangle;
import com.caochenlei.abstractFactory.shape.Shape;
import com.caochenlei.abstractFactory.shape.Square;

public class ShapeFactory extends AbstractFactory {
    @Override
    public Shape createShape(String shapeType) {
        if ("Rectangle".equalsIgnoreCase(shapeType)) {
            return new Rectangle();
        }
        if ("Square".equalsIgnoreCase(shapeType)) {
            return new Square();
        }
        if ("Circle".equalsIgnoreCase(shapeType)) {
            return new Circle();
        }
        return null;
    }

    @Override
    public Color createColor(String color) {
        return null;
    }
}
